
#ifndef SHADER_H
#define SHADER_H

#include <string>
#include <GL\glew.h>

#include "Matrix4.h"

namespace Krengine
{
	/* forward declaration to prevent compiling error */
	class DisplayObject;

	class Shader
	{
		public:
			Shader( const std::string name );
			//~Shader();

			bool init();
			virtual void setupUniforms();
			virtual void sendUniformData( const Matrix4& modelMat, const Matrix4& normalMat, const Matrix4& mvpMat );
			void cleanup();

		protected:
			std::string shaderName;

			//TODO remove bool
			/* flag indicating if a geometryshader is used */
			bool useGeomShader;

			/* shader and program ID's */
			GLuint vshader, fshader, gshader, progID;

			GLuint buildShader( GLenum );
	};
}
#endif